#version 330 core

uniform mat4 u_mProj;
uniform mat4 u_mView;
uniform mat4 u_mModel;
uniform mat4 u_mLight;


layout(location = 1) in vec3 a_Position;
layout(location = 2) in vec3 a_Normal;


out vec3 v_Position;
out vec3 v_Normal;
out vec3 v_LocalPosition;
out vec4 v_smCoord;







void main(void)
{
	v_LocalPosition = a_Position;
	v_Position = (u_mView*u_mModel*vec4(a_Position, 1)).xyz;
	v_Normal = mat3(u_mView*u_mModel)*a_Normal;
	v_smCoord = u_mLight*u_mModel*vec4((a_Position), 1.0);
	gl_Position  = u_mProj*vec4(v_Position, 1);
}